/*
 * @Author: your name
 * @Date: 2021-03-12 22:28:43
 * @LastEditTime: 2021-03-20 12:06:13
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \gitee_test\test_cpp.cpp
 */
#include<iostream>
#include<string>
using namespace std;
 
class Price							//造价类
{
public:
	void Bar_Way_Price(float r);     //计算游泳池边过道及栅栏造价
public:
	float _radial;		//半径
private:
	float s;        //面积
	float c;		//周长
};					
void Price::Bar_Way_Price(float r)				//计算游泳池边过道及栅栏造价
{
	s = 3.14*(r + 3)*(r + 3) - 3.14*r*r;    //大圆面积减去小圆面积得到圆形过道面积
	c = 2 * 3.14*(r + 3) + 2 * 3.14*r;    //大圆周长加小圆周长得到所需栅栏的长度
	int bar_price = c * 35;                    //与单价相乘得到造价
	cout << "过道的造价为：" << way_price << "元\t" << "栅栏的造价为：" << bar_price << "元\n" << endl;
}
 
int main()
{
	
	Price swim_pool;
	cout << "请输入游泳池的半径(米) "<< endl;
	cin >> swim_pool._radial;
	swim_pool.Bar_Way_Price(swim_pool._radial);
 
	system("pause");
	return 0;
}